<template>
    <div>
        动画组件
        <button @click="show = !show">Toggle</button>
        <Transition name="slide-fade">
            <p v-if="show">hello</p>
        </Transition>
    </div>
</template>

<script>

export default {
    name: '',
    data() {
        return {
            show: true,
        };
    },

}

</script>
<style scoped>
.slide-fade-enter-active {
    transition: all 0.3s ease-out;
}

.slide-fade-leave-active {
    transition: all 0.8s cubic-bezier(1, 0.5, 0.8, 1);
}

.slide-fade-enter-from,
.slide-fade-leave-to {
    transform: translateX(100%);
    opacity: 0;
}
</style>